﻿using System;

namespace PVTLibrary
{
    [Serializable]
    public class Substancia
    {

        protected string m_ComponentDescription     = string.Empty;
        protected string m_ComponentName            = string.Empty;
        protected Nullable<double> _molarfraction   = 0.0;
        protected Nullable<double> _massfraction    = 0.0;
        protected Nullable<double> _molarflow = 0.0;
        protected Nullable<double> _massflow = 0.0;
        protected Nullable<double> _fugacitycoeff = 0.0;
        protected Nullable<double> _activitycoeff  = 0.0;
        protected Nullable<double> _partialvolume  = 0.0;
        protected Nullable<double> _partialpressure  = 0.0;
        protected Nullable<double> _volumetricflow = 0.0;
        protected Nullable<double> _volumetricfraction = 0.0;
        protected bool _isPF = false;
        protected double _lnKval = 0.0;
        protected double _Kval = 0.0;

        /// <summary>
        /// 
        /// </summary>
        public double lnKvalue
        {
            get { return _lnKval; }
            set { _lnKval = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public double Kvalue
        {
            get { return _Kval; }
            set { _Kval = value; }
        }


        /// <summary>
        /// 
        /// </summary>
        public bool FracaoDePetroleo
        {
            get { return _isPF; }
            set { _isPF = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> FracaoMolar
        {
            get { return _molarfraction; }
            set { _molarfraction = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> FracaoMassica
        {
            get { return _massfraction; }
            set { _massfraction = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> MolarFlow
        {
            get { return _molarflow; }
            set { _molarflow = value; }
        }

        
        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> MassFlow
        {
            get { return _massflow; }
            set { _massflow = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> FugacityCoeff
        {
            get { return _fugacitycoeff; }
            set { _fugacitycoeff = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> ActivityCoeff
        {
            get { return _activitycoeff; }
            set { _activitycoeff = value; }
        }


        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> PartialVolume
        {
            get { return _partialvolume; }
            set { _partialvolume = value; }
        }


        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> PartialPressure
        {
            get { return _partialpressure; }
            set { _partialpressure = value; }
        }


        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> VolumetricFlow
        {
            get { return _volumetricflow; }
            set { _volumetricflow = value; }
        }


        /// <summary>
        /// 
        /// </summary>
        public Nullable<double> VolumetricFraction
        {
            get { return _volumetricfraction; }
            set { _volumetricfraction = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public string Descricao
        {
            get { return m_ComponentDescription; }
            set { m_ComponentDescription = value; }
        }


        /// <summary>
        /// 
        /// </summary>
        public string Nome
        {
            get { return m_ComponentName; }
            set { m_ComponentName = value; }
        }




        public TemperatureDependentProperties TDProperties = new TemperatureDependentProperties();
        public PressureDependentProperties PDProperties = new PressureDependentProperties();
        public ConstantProperties ConstantProperties = new ConstantProperties();

        public Substancia(string nome, string descricao)
        {
            m_ComponentName = nome;
            m_ComponentDescription = descricao;

        }
    }

    <
}